package com.nuoniu.sibanyun.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * @auther 小啊刚
 * @date 2020/6/27
 */
@Configuration
public class YmlConfig {
    public static String APPID = "2019102168512590";
    // 私钥 pkcs8格式的
    public static String RSA_PRIVATE_KEY = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCBR5z5trNlJYQThjdYKt1nGQC4uNss389lhHSU5bbLykGAloscz/B4eX+rBDh/RR0g/L9Mt+zfc/be7Yr+KjDbbkCz5KXJ2nxoCc+GfbafZ/A2edmqn4C7ZEd4jKNGaHPNsKn8BJ5qea80gZg4NIdelOJWvOHHUSlK1MBXlSyfAM6YK3f8HNjSwFectpxn3MSW0Ixlu2xdBhl8P9EzLoHoEaft+nBvYIRrt6N1tY4FBOkhwGQtEo77Y6Fcu5jpiGXb9Hch+9ZAHgTwtHzSvJMSGVWZ0D5OctwHA/AKmH1gqUHUdCzbi4I+TmtPU2QdEAcp98auSh7Q77ZKmK+XLEa/AgMBAAECggEAewxYgu28rmcY4SR8hPS3qyuHHksEgh+8XVnHRPmoFSw7UFL5scDRlzm9pF7uD2UPJpiq1DCzyrOro9/gza4GtrSn7RGSIyBMDRJZbh81tV/OqWstHFOYycPWqwzhU2CT6JFgGbmjtqB/fLBk3ApTVljLXdeF5pp/fPQm5rXbtLJJoR5cRL/8QoYfgL+y7Xu1hD0dePlp9tKhtVPVcFqsRZXJHG8fP6G32ubRqNubfeKlgFqAKSCV2DOwfzyNh4uKV35nsU6q8ncgGEayS9jcGuvnRnaSuXxvbjNNqw0lSl6cDhOlh0Ui6MdG/X4qfTZX4LSM2Yg9V9Xa7MXLzpXhEQKBgQDKkEC216XswS6nArdQDraXGjb/QGGh1C3q/c6ro+kKLwXTQsDAcyARglVSdMgbdMlTP92tj4hVQephyNyoX9hODi39junLF5hGAQh8/d5alLn7T1Rzp6KH9pF1t5eZiJXC4ZwpoiIRrRM9tn3UHkge4jBly2551xdoInUjMDXcdQKBgQCjYkd3cj4iiPQFl5AQf6qxLSsOX2Ts8yb+LGeY/xruXmWGb/IwTFurNTtLDduxLzrTHC/qd4zXAN5xMxPag+vjjjWU/6lAL4gj6exKWZQtIXebSe0Qziqe/h+1a6gzcHEsHEVacF68WBgnynBTJtdAer+2yGQO5Ffc8ONArGU/4wKBgFpC60NOVpZoArTS5gJbfAta2BTniFnHJWroC/a5xDcQewUHYsKeyjRjIkfq19w8LxXUiKA1LCfphlpqWcEBbG5jrSSmURF5gxX2keS4byNn0HPmhpg+o5L4URrmYzw7+5fqVl7K62l6+O7v6aPilnqEidJiUukh6kEx0YaLjgSdAoGBAJLinUuWiqPzqiaI3vzmOef1qprOSmb4JxslgrG6z1RzyyR06jBfxZ4DSl4shFEkG+eFlNJfTmBRKKpueC/goCbBSAy/WEMbOHLJMCSbqip0xxn1+Uo9f3XXE1y//8TXFvfIJtWq5pC/RmAnkJpA9g3DDS5ftAzrXs6ERlpzYsdvAoGAFmjkUJDtSfFjhrpXYiu+D8UrAm36cpRhOTmL8W6sOSKXjwAveSTjnO4Sqee2p5zLKeW7uoVU6QdCKXHdQ1Ihc7L6OL4+eLQ1txvcwrxEcGA1CQirP6s8ULJ82xvXy/S7rJMyr6VAOyj+WjD6uwvVz7+xhXq6zP3siVg5NBaI/zc=";
    // 服务器异步通知页面路径 需http://或者https://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String notify_url = "";
    // 页面跳转同步通知页面路径 需http://或者https://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问 商户可以自定义同步跳转地址
    public static String return_url = "";
    // 请求网关地址
    public static String URL = "https://openapi.alipay.com/gateway.do";
    // 编码
    public static String CHARSET = "UTF-8";
    // 返回格式
    public static String FORMAT = "json";
    // 支付宝公钥
    public static String ALIPAY_PUBLIC_KEY = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA12svAT2Ybyz32c/wIt9tkoq1l8m6z+txkD4g3qUSrVu6g6g8c/TntQ0FyTEBv5rvAxuBMovfWZptHclv5CkbwAX1OkRFzs9A8oxwOuBFmnh67+IFP3iqbkeMqyTjBk3OGuIh9iXVkSPR3kGDdAJPui7JzHpRwMvawMSYXJNvNrCfKy2ktA90ZB+u4T8D4KL11O/HKRWoQN4+1ejJAnEZ98WQ++DwnR8kAiyoK7098NBaYGBYWg6dez+Vtsjp6tvwopduLh9b7xgI93gAfZ56FNlCO6Icu6p0aat4o7gb1LAFzNaveS75BsP4+NifayTDexp5iNeSSZELSooWNL506wIDAQAB";
    // 日志记录目录
    public static String log_path = "/log";
    // RSA2
    public static String SIGNTYPE = "RSA2";
    /**文件上传地址**/
    public static String UPLOAD_FILE_PATH;
    /**文件访问地址**/
    public static String DOWNLOAD_FILE_URL;
    /**前端注册地址**/
    public static String REGISTER_URL;
    /**前端入职地址*/
    public static String ENTRY_URL;

    @Autowired(required = false)
    public void setUploadFilePath(@Value("${upload.file.path}")String path) {
        UPLOAD_FILE_PATH = path;
    }

    @Autowired(required = false)
    public void setDOWNLOADFilePath(@Value("${upload.file.url}")String url) {
        DOWNLOAD_FILE_URL = url;
    }

    @Autowired(required = false)
    public void setRegisterUrl(@Value("${registerUrl}")String registerUrl) {
        REGISTER_URL = registerUrl;
    }

    @Autowired(required = false)
    public void setEntryUrl(@Value("${entryUrl}")String entryUrl) {
        ENTRY_URL = entryUrl;
    }
}
